﻿<%@ Page Title="Update Events" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Update events.aspx.cs" Inherits="SoftwareEngineering_Project.UpdateEvents" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">

        .style9
        {
            color: #000000;
        }
        .style3
        {
            width: 100%;
        }
        .style4
        {
            width: 320px;
            color: #000000;
        }
        .style19
        {
            color: #000000;
            width: 313px;
        }
        .style7
        {
            width: 320px;
            height: 16px;
        }
        .style18
        {
            height: 16px;
            width: 313px;
        }
        .style8
        {
            height: 16px;
        }
        .style14
        {
            width: 320px;
            height: 8px;
            color: #000000;
        }
        .style20
        {
            height: 8px;
            width: 150px;
            color: #000000;
        }
        .style22
        {
            height: 8px;
            width: 76px;
            color: #000000;
        }
        .style16
        {
            width: 320px;
            height: 6px;
        }
        .style21
        {
            height: 6px;
            width: 150px;
        }
        .style23
        {
            height: 6px;
            width: 76px;
        }
        .style24
        {
            height: 21px;
            color: #993300;
            font-weight: bold;
        }
        .style25
        {
            height: 7px;
        }
        .style27
        {
            height: 36px;
            text-align: left;
            color: #000000;
        }
        .style5
        {
            height: 36px;
            text-align: left;
        }
        </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Update Events</h2>
        <span class="style9" style="text-align: center">
    <p>
        <strong>Double click on an event to update the details:</strong></p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:s-cheduleDBConnectionString %>" 
            onselecting="SqlDataSource1_Selecting" 
            
        SelectCommand="select ReservationID as 'ID',Res_Date as'Reservation Date', stime 'Start Time',etime as 'End Time',Reservation.Name as 'Event’s title',Organizer,room.Name as'Location' from reservation,Room WHERE reservation.Room_ID = Room.Room_ID AND Username = 'admin'">
        </asp:SqlDataSource>
    <br />
        <asp:GridView ID="MyEvents" runat="server" CellPadding="4" ForeColor="#333333" 
            onselectedindexchanged="MyEvents_SelectedIndexChanged" Width="866px" 
            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="Reservation Date" HeaderText="Reservation Date" 
                    SortExpression="Reservation Date" />
                <asp:BoundField DataField="Start Time" HeaderText="Start Time" 
                    SortExpression="Start Time" />
                <asp:BoundField DataField="End Time" HeaderText="End Time" 
                    SortExpression="End Time" />
                <asp:BoundField DataField="Event’s title" HeaderText="Event’s title" 
                    SortExpression="Event’s title" />
                <asp:BoundField DataField="Organizer" HeaderText="Organizer" 
                    SortExpression="Organizer" />
                <asp:BoundField DataField="Location" HeaderText="Location" 
                    SortExpression="Location" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    <p>
        Specify the type of the conference</span><strong 
            style="text-align: left">:
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem>Phone conference</asp:ListItem>
            <asp:ListItem>Video conference</asp:ListItem>
            <asp:ListItem>Phone and video</asp:ListItem>
            <asp:ListItem>Room Only</asp:ListItem>
        </asp:DropDownList>
        </strong>
    </p>
&nbsp;<table class="style3" frame="box">
            <tr>
                <td class="style4">
                    Title of the meeting:</td>
                <td class="style19" colspan="3">
                    Organizer:</td>
                <td class="style9">
                    Location:</td>
            </tr>
            <tr>
                <td class="style7">
                    <asp:TextBox ID="title" runat="server" Width="271px" CssClass="bold"></asp:TextBox>
                </td>
                <td class="style18" colspan="3">
                    <asp:TextBox ID="Organizer" runat="server" 
                        Width="227px" CssClass="bold"></asp:TextBox>
                </td>
                <td class="style8">
                    <asp:DropDownList ID="DropDownList2" runat="server" CssClass="bold">
                        <asp:ListItem>Conference room B</asp:ListItem>
                        <asp:ListItem>Conference room C</asp:ListItem>
                        <asp:ListItem>Library Room</asp:ListItem>
                        <asp:ListItem>JFJ</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style14">
                    Date:</td>
                <td class="style20">
                    Start time:</td>
                <td class="style22" colspan="2">
                    End time:</span></td>
            </tr>
            <tr>
                <td class="style16">
                    <asp:TextBox ID="date" runat="server" CssClass="bold"></asp:TextBox>
                </td>
                <td class="style21">
                    <asp:TextBox ID="starttime" runat="server" CssClass="bold"></asp:TextBox>
                </td>
                <td class="style23" colspan="2">
                    <asp:TextBox ID="endtime" runat="server" CssClass="bold"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style24" colspan="5">
                    <strong>More details:</strong></td>
            </tr>
            <tr class="style9">
                <td class="style25">
                    Record this conference (Audio)</td>
                <td class="style25" colspan="2">
                    Record this conference (Video)</td>
                <td class="style25" colspan="2">
                    Do you need presentation?</td>
            </tr>
            <tr>
                <td class="style27">
                    <asp:RadioButton ID="RecordAudioYes" runat="server" Text="Yes" />
                    <asp:RadioButton ID="recordAudioNo" runat="server" Text="No" />
                </td>
                <td class="style5" colspan="2">
                    <span class="style9">
                    <asp:RadioButton ID="RecordAudioYes0" runat="server" Text="Yes" />
                    <asp:RadioButton ID="recordAudioNo0" runat="server" Text="No" />
                </td>
                <td class="style27" colspan="2">
                    <asp:RadioButton ID="RecordAudioYes1" runat="server" Text="Yes" />
                    <asp:RadioButton ID="recordAudioNo1" runat="server" Text="No" />
                    </span>
                </td>
            </tr>
            <tr>
                <td class="style5" colspan="5">
                    <asp:Button ID="Save" runat="server" ForeColor="Maroon" Text="Save" 
                        Width="72px" CssClass="bold" />
                </td>
            </tr>
        </table>
        </asp:Content>
